package com.totem.base.enums;

import lombok.Getter;

import java.util.Objects;

@Getter
public enum AppConfigItemNameEnum {
    SUBSCRIBE_SHOW_SPECIAL("SUBSCRIBE_SHOW_SPECIAL"),
    FUND_RETURN_RATE("FUND_RETURN_RATE"),
    FUND_WITHDRAW_FEE("FUND_WITHDRAW_FEE"),
    WITHDRAW_MIN("WITHDRAW_MIN"),
    WITHDRAW_MAX("WITHDRAW_MAX"),
    WITHDRAW_FEE("WITHDRAW_FEE"),
    USDT_COLLECTION_ADDR("USDT_COLLECTION_ADDR"),
    CHARGE_PRIVATE_KEY("CHARGE_PRIVATE_KEY"),
    CHARGE_ADDRESS("CHARGE_ADDRESS"),
    BALANCE_CONVERSION_FEE("BALANCE_CONVERSION_FEE");


    private final String code;

    AppConfigItemNameEnum(String code){
        this.code = code;
    }

    public static AppConfigItemNameEnum byCode(String code) {
        for (AppConfigItemNameEnum e: AppConfigItemNameEnum.values()) {
            if (e.code.equalsIgnoreCase(code)) {
                return e;
            }
        }
        return null;
    }
}
